using System;
using System.Collections.Generic;
using System.Text;

namespace RStarTree
{
    public class rectangle
    {
        public int id;
        public int UX, UY, LX, LY;
        public short Prop;

        public rectangle(int i)
        {
            /*Random ran = new Random();
            this.id = i;
            //        this.LX=(int) ((Constants.MAXCOORD-1)*Math.random());
            //        this.LY=(int) ((Constants.MAXCOORD-1)*Math.random());
            this.LX = (int)((UserInterface.getMAXCOORD() - 1) * ran.Next(0, 1));
            this.LY = (int)((UserInterface.getMAXCOORD() - 1) * ran.Next(0, 1));
            do
            {
                this.UX = (int)(Math.Min(
                    //                                Constants.MAXCOORD-this.LX,
                    //                                Constants.MAXWIDTH
                                    UserInterface.getMAXCOORD() - this.LX,
                                    UserInterface.getMAXWIDTH()
                                ) * ran.Next(0,1) + this.LX);
            } while (UX == LX);

            do
            {
                this.UY = (int)(Math.Min(
                    //                                Constants.MAXCOORD-this.LY,
                    //                                Constants.MAXWIDTH
                                    UserInterface.getMAXCOORD() - this.LY,
                                    UserInterface.getMAXWIDTH()
                                ) * ran.Next(0, 1) + this.LY);
            } while (UX == LX);

            this.Prop = (short)(5 *  + 1);
             */
        }
            
        public void print()
    {
      Console.WriteLine(this.LX+" , "+this.LY);
      Console.WriteLine(this.UX+" , "+this.UY);
    }

    /*    public Rectangle toRectangle()
        {
            return new Rectangle(LX, LY, UX - LX, UY - LY);
        }*/
    }
}
